package com.lx.service.impl;

import com.lx.bean.User;
import com.lx.mapper.UserMapper;
import com.lx.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public int addUser(User user) {
        int i = userMapper.insertUser(user);
        return i;
    }

    @Override
    public User selectUserByPhone(String phone) {
        User user = userMapper.selectUserByPhone(phone);
        return user;
    }

    @Override
    public int updateUserByPhone(User user) {
        int i = userMapper.updateUserByPhone(user);
        return i;
    }
}
